<html>
    <head>
        <link rel="stylesheet" href="./bootstrap-3.3.7-dist/css/bootstrap.css">
        <script src="./jquery-3.2.1.js"></script>        
        <script src="./bootstrap-3.3.7-dist/js/bootstrap.js"></script>
        <style>
       
        </style>
    </head>
    <body>
      <h1 class="text-center">统一建模语言理论测试</h1> 
      <p class="text-center">
         <span>考试科目：统一建模语言</span>
         <span>时间：100分钟</span>
           <span id="score">得分：100分</span>
      </p>
             
     <form>
     <div class="container">
         <div class="row">
             <div class="col-md-4">
              <div class="input-group">
                <span class="input-group-addon">班级：</span>
                <input type="text" class="form-control">
      
            </div>
             </div>
             <div class="col-md-4">
              <div class="input-group">
                <span class="input-group-addon">学号：</span>
                <input type="text" class="form-control">
      
            </div>
             </div>
             <div class="col-md-4">
              <div class="input-group">
                <span class="input-group-addon">姓名：</span>
                <input type="text" class="form-control">
      
            </div>
             </div>
         </div>
         </div>
         <h3>一.填空题(每空5分，共20分)</h3>
                <span >1.UML的中文名称是：</span>
                <div class="container">
                    <div class="row">
                        <div class="col-md-6">
                            <input type="text" class="form-control" id="blank1" >
                        </div>
                    </div>
                </div>
                    <span>2.对象最突出的特征是：</span>
                    <div class="container">
                      <div class="row">
                          <div class="col-md-3">
                              <input type="text" class="form-control"   id="blank2">
                          </div>
                          <div class="col-md-3">
                              <input type="text" class="form-control"  id="blank3">
                          </div>
                          <div class="col-md-3">
                              <input type="text" class="form-control"   id="blank4">
                          </div>
                      </div>
                    </div>
                  
     
            
     
     
     
     
     
               <h3>二.选择题(每空5分，共20分)</h3>
               
       
       
            <label for="number">1.UML与软件工程的关系是：</label>
          <div class="row">
              <div class="col-lg-6">
                <div class="input-group">
                  <span class="input-group-addon">
                    <input type="radio" name="a" >
                  </span>
                  <input type="text" class="form-control" name="select1" value="(A) UML是软件工程的一部分">
                </div><!-- /input-group -->
              </div><!-- /.col-lg-6 -->
            </div><!-- /.row -->
            <div class="row">
                <div class="col-lg-6">
                  <div class="input-group">
                    <span class="input-group-addon" >
                      <input type="radio" name="a" id="B">
                    </span>
                    <input type="text" class="form-control" name="select1" value="(B) UML参与到软件工程中软件开发过程的几个阶段">
                  </div><!-- /input-group -->
                </div><!-- /.col-lg-6 -->
              </div><!-- /.row -->
              <div class="row">
                  <div class="col-lg-6">
                    <div class="input-group">
                      <span class="input-group-addon">
                        <input type="radio" name="a">
                      </span>
                      <input type="text" class="form-control" name="select1" value="(c) UML是软件工程的一部分">
                    </div><!-- /input-group -->
                  </div><!-- /.col-lg-6 -->
                </div><!-- /.row -->
                <div class="row">
                    <div class="col-lg-6">
                      <div class="input-group">
                        <span class="input-group-addon">
                          <input type="radio" name="a">
                        </span>
                        <input type="text" class="form-control" name="select1" value="(D) UML是软件工程的一部分">
                      </div><!-- /input-group -->
                    </div><!-- /.col-lg-6 -->
                  </div><!-- /.row -->
               



                  <label for="number">2.JAVA语言支持：：</label>
                  <div class="row">
                      <div class="col-lg-6">
                        <div class="input-group">
                          <span class="input-group-addon">
                            <input type="radio" name="a1" id="A">
                          </span>
                          <input type="text" class="form-control" name="select2" value="(A)单继承">
                        </div><!-- /input-group -->
                      </div><!-- /.col-lg-6 -->
                    </div><!-- /.row -->
                    <div class="row">
                        <div class="col-lg-6">
                          <div class="input-group">
                            <span class="input-group-addon" >
                              <input type="radio" name="a1">
                            </span>
                            <input type="text" class="form-control" name="select2" value="(B)多继承">
                          </div><!-- /input-group -->
                        </div><!-- /.col-lg-6 -->
                      </div><!-- /.row -->
                      <div class="row">
                          <div class="col-lg-6">
                            <div class="input-group">
                              <span class="input-group-addon">
                                <input type="radio" name="a1">
                              </span>
                              <input type="text" class="form-control" name="select2" value="(C)单继承和多继承都支持">
                            </div><!-- /input-group -->
                          </div><!-- /.col-lg-6 -->
                        </div><!-- /.row -->
                        <div class="row">
                            <div class="col-lg-6">
                              <div class="input-group">
                                <span class="input-group-addon">
                                  <input type="radio" name="a1">
                                </span>
                                <input type="text" class="form-control" name="select2" value="(D)单继承和多继承都不支持">
                              </div><!-- /input-group -->
                            </div><!-- /.col-lg-6 -->
                          </div><!-- /.row -->
                       
                       
                          <h3> 三、多择题（每题10分，共20分）</h3>
                          <label class="control-label">1. 用户的粒度分为以下哪三种：</label>
                          <div class="row">
                          <div class="col-lg-6">
                            <div class="input-group">
                              <span class="input-group-addon">
                                <input type="checkbox" id="c1">
                              </span>
                              <input type="text" class="form-control"value="(A)概述级">
                              
                            </div><!-- /input-group -->
                          </div><!-- /.col-lg-6 -->
                          </div>
                          <div class="row">
                              <div class="col-lg-6">
                                <div class="input-group">
                                  <span class="input-group-addon">
                                    <input type="checkbox" id="c2">
                                  </span>
                                  <input type="text" class="form-control"value="(B)需求级">
                                  
                                </div><!-- /input-group -->
                              </div><!-- /.col-lg-6 -->
                              </div>
                              
                              <div class="row">
                                  <div class="col-lg-6">
                                    <div class="input-group">
                                      <span class="input-group-addon">
                                        <input type="checkbox" name="hobby">
                                      </span>
                                      <input type="text" class="form-control" value="(C)用户目标级">
                                      
                                    </div><!-- /input-group -->
                                  </div><!-- /.col-lg-6 -->
                                  </div>
                                  <div class="row">
                                      <div class="col-lg-6">
                                        <div class="input-group">
                                          <span class="input-group-addon">
                                            <input type="checkbox" id="c3">
                                          </span>
                                          <input type="text" class="form-control"value="(D)子功能级">
                                          
                                        </div><!-- /input-group -->
                                      </div><!-- /.col-lg-6 -->
                                      </div>
                                      <label class="control-label">2. 类图由以下哪三部分构成：</label>
                                      <div class="row">
                                          <div class="col-lg-6">
                                            <div class="input-group">
                                              <span class="input-group-addon">
                                                <input type="checkbox"id="c4">
                                              </span>
                                              <input type="text" class="form-control"value="(A)名称(Name)">
                                              
                                            </div><!-- /input-group -->
                                          </div><!-- /.col-lg-6 -->
                                          </div><div class="row">
                                              <div class="col-lg-6">
                                                <div class="input-group">
                                                  <span class="input-group-addon">
                                                    <input type="checkbox" id="c5">
                                                  </span>
                                                  <input type="text" class="form-control"value="(B)属性(Attribute)">
                                                  
                                                </div><!-- /input-group -->
                                              </div><!-- /.col-lg-6 -->
                                              </div><div class="row">
                                                  <div class="col-lg-6">
                                                    <div class="input-group">
                                                      <span class="input-group-addon">
                                                        <input type="checkbox" id="c6">
                                                      </span>
                                                      <input type="text" class="form-control"value="(C)操作(Operation)">
                                                      
                                                    </div><!-- /input-group -->
                                                  </div><!-- /.col-lg-6 -->
                                                  </div><div class="row">
                                                      <div class="col-lg-6">
                                                        <div class="input-group">
                                                          <span class="input-group-addon">
                                                            <input type="checkbox">
                                                          </span>
                                                          <input type="text" class="form-control"value="(D)方法(Function)">
                                                          
                                                        </div><!-- /input-group -->
                                                      </div><!-- /.col-lg-6 -->
                                                      </div>
                                                      <h3>四、判断题（每题10分，共20分）</h3>
                                                      <p>1.用例图只是用于和客户交流和沟通的，用于确定需求。</p>
                                                      <div class="radio" name="1">
                                                          <label>
                                                            <input type="radio" name="optionsRadios1" value="option1" > √
                                                          </label>
                                                        </div>
                                                        <div class="radio" name="1">
                                                          <label>
                                                            <input type="radio" name="optionsRadios1" id="optionsRadios2" value="option2">×
                                                          </label>
                                                        </div>
                                                      <p>2.在状态图中，终止状态在一个状态图中允许有任意多个。</p>
                                                      <div class="radio" name="2">
                                                          <label>
                                                            <input type="radio" name="optionsRadios" id="optionsRadios1" value="option1"> √
                                                          </label>
                                                        </div>
                                                        <div class="radio" name="2">
                                                          <label>
                                                            <input type="radio" name="optionsRadios"  value="option2">×
                                                          </label>
                                                        </div>
                                                      <h3>五、简答题（每题20分，共20分）</h3>
                                                      <div class="row">
             <div class="col-md-6">
               <p><textarea class="form-control" id="comments" rows="3">
                  
               </textarea>
              </p></div>
            
           </div>
           </div>
          </form>
         
<button type="button" class="btn btn-primary btn-lg" data-toggle="modal" data-target="#myModal"   id="btnSubmit">
 提交
</button>
<script>
  let btn = document.getElementById("btnSubmit");
  btn.addEventListener("click",function (e) {
      e.preventDefault();
      
      let blank1 = document.getElementById("blank1");
      let answer1 = blank1.value;
      let score=0;
      if(answer1=="统一建模语言")
      {
        score+=5;
      }

      let blank2 = document.getElementById("blank2");
      let answer2 = blank2.value;
      
      if(answer2=="封装性")
      {
        score+=5;
      }
      let blank3 = document.getElementById("blank3");
      let answer3 = blank3.value;
      
      if(answer3=="继承性")
      {
        score+=5;
      }



      let blank4 = document.getElementById("blank4");
      let answer4 = blank4.value;

      if(answer4=="多态性")
      {
        score+=5;
      }

        let radio1 = document.getElementById("B");
       // console.log(radio1);
        if(radio1.checked)
            {
              
              score+=10;
            }

            let radio2 = document.getElementById("A");
       // console.log(radio1);
        if(radio2.checked)
            {
              
              score+=10;
            }


         
        let checkbox1 = document.getElementById("c1");
        let checkbox2= document.getElementById("c2");
         let checkbox3 = document.getElementById("c3");
         
         if(checkbox3.checked  && checkbox1.checked && checkbox2.checked)
         {
           score+=10;
         }
               
       
         let checkbox4 = document.getElementById("c4");
        let checkbox5= document.getElementById("c5");
         let checkbox6 = document.getElementById("c6");
         
         if(checkbox4.checked  && checkbox5.checked && checkbox6.checked)
         {
           score+=10;
         }
               
        
         let radio3 = document.getElementById("optionsRadios2");
       
        if(radio3.checked)
            {
              
              score+=10;
            }
        


            let radio4 = document.getElementById("optionsRadios1");
       
        if(radio4.checked)
            {
              
              score+=10;
            }
        

            let texts = document.getElementById("comments");
        let t = texts.value;
        if(t=="模型是对现实世界的抽象和简化，模型是对所研究的系统、过程、事物或概念的一种表达形式。可以是物理实体；可以是某种图形；或者是一种数学表达式.")
     {
       score+=20;
     }




       





alert("确认提交？");
    
     
     let test = document.getElementById("score");
      test.innerHTML ="考试得分"+ score;
      
  });
</script>


     

 
    </body>
</html>